3.114 \(\int \sin (x) \sqrt {1+\sin ^2(x)} \, dx\)

Optimal. Leaf size=30 \[ -\frac {1}{2} \cos (x) \sqrt {2-\cos ^2(x)}-\sin ^{-1}\left (\frac {\cos (x)}{\sqrt {2}}\right ) \]

[Out]

-arcsin(1/2*cos(x)*2^(1/2))-1/2*cos(x)*(2-cos(x)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3186, 195, 216} \[ -\frac {1}{2} \cos (x) \sqrt {2-\cos ^2(x)}-\sin ^{-1}\left (\frac {\cos (x)}{\sqrt {2}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sin[x]*Sqrt[1 + Sin[x]^2],x]

[Out]

-ArcSin[Cos[x]/Sqrt[2]] - (Cos[x]*Sqrt[2 - Cos[x]^2])/2

Rule 195

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(x*(a + b*x^n)^p)/(n*p + 1), x] + Dist[(a*n*p)/(n*p + 1),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 216

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[(Rt[-b, 2]*x)/Sqrt[a]]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 3186

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos
[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \sin (x) \sqrt {1+\sin ^2(x)} \, dx &=-\operatorname {Subst}\left (\int \sqrt {2-x^2} \, dx,x,\cos (x)\right )\\ &=-\frac {1}{2} \cos (x) \sqrt {2-\cos ^2(x)}-\operatorname {Subst}\left (\int \frac {1}{\sqrt {2-x^2}} \, dx,x,\cos (x)\right )\\ &=-\sin ^{-1}\left (\frac {\cos (x)}{\sqrt {2}}\right )-\frac {1}{2} \cos (x) \sqrt {2-\cos ^2(x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.05, size = 53, normalized size = 1.77 \[ -\frac {\cos (x) \sqrt {3-\cos (2 x)}}{2 \sqrt {2}}+i \log \left (\sqrt {3-\cos (2 x)}+i \sqrt {2} \cos (x)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]*Sqrt[1 + Sin[x]^2],x]

[Out]

-1/2*(Cos[x]*Sqrt[3 - Cos[2*x]])/Sqrt[2] + I*Log[I*Sqrt[2]*Cos[x] + Sqrt[3 - Cos[2*x]]]

________________________________________________________________________________________

fricas [B]  time = 0.46, size = 71, normalized size = 2.37 \[ -\frac {1}{2} \, \sqrt {-\cos \relax (x)^{2} + 2} \cos \relax (x) + \frac {1}{2} \, \arctan \left (-\frac {\cos \relax (x) \sin \relax (x) - {\left (\cos \relax (x)^{3} - \cos \relax (x)\right )} \sqrt {-\cos \relax (x)^{2} + 2}}{\cos \relax (x)^{4} - 3 \, \cos \relax (x)^{2} + 1}\right ) - \frac {1}{2} \, \arctan \left (\frac {\sin \relax (x)}{\cos \relax (x)}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)*(1+sin(x)^2)^(1/2),x, algorithm="fricas")

[Out]

-1/2*sqrt(-cos(x)^2 + 2)*cos(x) + 1/2*arctan(-(cos(x)*sin(x) - (cos(x)^3 - cos(x))*sqrt(-cos(x)^2 + 2))/(cos(x
)^4 - 3*cos(x)^2 + 1)) - 1/2*arctan(sin(x)/cos(x))

________________________________________________________________________________________

giac [A]  time = 0.15, size = 25, normalized size = 0.83 \[ -\frac {1}{2} \, \sqrt {-\cos \relax (x)^{2} + 2} \cos \relax (x) - \arcsin \left (\frac {1}{2} \, \sqrt {2} \cos \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)*(1+sin(x)^2)^(1/2),x, algorithm="giac")

[Out]

-1/2*sqrt(-cos(x)^2 + 2)*cos(x) - arcsin(1/2*sqrt(2)*cos(x))

________________________________________________________________________________________

maple [A]  time = 1.11, size = 51, normalized size = 1.70 \[ -\frac {\sqrt {\left (1+\sin ^{2}\relax (x )\right ) \left (\cos ^{2}\relax (x )\right )}\, \left (\sqrt {-\left (\cos ^{4}\relax (x )\right )+2 \left (\cos ^{2}\relax (x )\right )}+\arcsin \left (\cos ^{2}\relax (x )-1\right )\right )}{2 \cos \relax (x ) \sqrt {1+\sin ^{2}\relax (x )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)*(1+sin(x)^2)^(1/2),x)

[Out]

-1/2*((1+sin(x)^2)*cos(x)^2)^(1/2)*((-cos(x)^4+2*cos(x)^2)^(1/2)+arcsin(cos(x)^2-1))/cos(x)/(1+sin(x)^2)^(1/2)

________________________________________________________________________________________

maxima [A]  time = 0.54, size = 25, normalized size = 0.83 \[ -\frac {1}{2} \, \sqrt {-\cos \relax (x)^{2} + 2} \cos \relax (x) - \arcsin \left (\frac {1}{2} \, \sqrt {2} \cos \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)*(1+sin(x)^2)^(1/2),x, algorithm="maxima")

[Out]

-1/2*sqrt(-cos(x)^2 + 2)*cos(x) - arcsin(1/2*sqrt(2)*cos(x))

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.03 \[ \int \sin \relax (x)\,\sqrt {{\sin \relax (x)}^2+1} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)*(sin(x)^2 + 1)^(1/2),x)

[Out]

int(sin(x)*(sin(x)^2 + 1)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\sin ^{2}{\relax (x )} + 1} \sin {\relax (x )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)*(1+sin(x)**2)**(1/2),x)

[Out]

Integral(sqrt(sin(x)**2 + 1)*sin(x), x)

________________________________________________________________________________________